<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //两种方法创建字符串
        let str1="tw.com";
        let str2=new String("tw.com");
        console.log(str1);
        console.log(str2);  //String {'tw.com'}
                            // 0: "t"
                            // 1: "w"
                            // 2: "."
                            // 3: "c"
                            // 4: "o"
                            // 5: "m"
                            // length: 6
                            // [[Prototype]]: String
                            // [[PrimitiveValue]]: "tw.com,我认为就是数组
    console.log(str2[1]);//就是数组

    //转意符
      let str3="tw\".com";
      console.log(str3);

     //字符串的拼接
     s1="唐玮";
     s2="帅哥";
     console.log(s1+"当然是"+s2+"啦");
     //新版的js，建议用这种，方便

     let ss1=`${s1}当然是${s2}啦`;//符号`是1旁边的键
      console.log(ss1);
   //最后一种concat(),来拼接字符串
      console.log("唐玮".concat(250));
    </script>
</body>
</html>